package ru.sh.panel;

import javax.microedition.khronos.opengles.GL10;

import ru.sh.jewel.Jewel;
import android.util.Log;
import framework.panel.Panel;
import framework.panel.PanelElement;

public class JewelsPanel extends Panel {

	private PanelElement needJewels = new NeedJewelsElement();
	private PanelElement goodJewels = new GoodJewelsElement();
	private PanelElement badJewels = new BadJewelsElement();
	
	@Override
	public void draw(GL10 gl, float deltaTime) {
		needJewels.draw(gl, deltaTime);
		goodJewels.draw(gl, deltaTime);
		badJewels.draw(gl, deltaTime);
	}

	public void inc(int type) {
		switch (type) {
			case Jewel.NEED_TYPE:
				needJewels.incValue();
				break;
			case Jewel.GOOD_TYPE:
				goodJewels.incValue();
				break;
			case Jewel.BAD_TYPE:
				badJewels.incValue();
				break;
			default:
				Log.e(null, "Error incrementing jewel");
				break;
		}		
	}

	@Override
	protected void initPresentation() {
		// TODO Auto-generated method stub
		
	}
	
}
